 import java.util.Scanner;
  2
  3 public class MyDCTester  {
  4
  5   public static void main (String[] args) {
  6
  7     String expression, again;
  8
  9     int result;
 10
 11     try
 12     {
 13       Scanner in = new Scanner(System.in);
 14
 15       do
 16       {
 17         MyDC evaluator = new MyDC();
 18         System.out.println ("Enter a valid postfix expression: ");
 19         expression = in.nextLine();
 20
 21         result = evaluator.evaluate (expression);
 22         System.out.println();
 23         System.out.println ("That expression equals " + result);
 24
 25         System.out.print ("Evaluate another expression [Y/N]? ");
 26         again = in.nextLine();
 27         System.out.println();
 28       }
 29       while (again.equalsIgnoreCase("y"));
 30     }
 31     catch (Exception IOException)
 32     {
 33       System.out.println("Input exception reported");
 34     }
 35   }
 36 }


